#include<iostream>

using namespace std;

template<typename T>
void Swap(T& t1,T& t2)
{
  T tmp = t1;
  t1 = t2;
  t2 = tmp;
}

int main()
{
  double d1,d2;
  int i1,i2;
  d1 = 3.14;
  d2 = 5.20;
  i1 = 3;
  i2 = 5;

  Swap(d1,d2);
  Swap(i1,i2);

  cout << d1 << " " << d2 << endl;
  cout << i1 << " " << i2 << endl;

  return 0;
}
